package com.soboot.system;

import com.soboot.log.utils.LogUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.ApplicationPidFileWriter;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.cloud.openfeign.EnableFeignClients;

/**
 * @Author:
 * @createTime: 2022年09月20日 16:38:01
 * @version:  1.0
 * @Description: 系统启动类
 * @Copyright:
 */
@RefreshScope
@MapperScan("com.soboot.system.mapper")
@EnableFeignClients(basePackages = {"com.soboot.system.feign"})
@SpringBootApplication(scanBasePackages = {"com.soboot.*","com.soboot.system.*"})
public class SystemApplication {
    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(SystemApplication.class);
        //记录应用PID写入当前目录application.pid下
        springApplication.addListeners(new ApplicationPidFileWriter());
        springApplication.run(args);
        LogUtil.info("system服务启动成功!");
    }
}
